home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4436 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.6 KB  |  56 lines

  1. Newsgroups: comp.lang.c++
  2. Path: cs.vu.nl!jalten
  3. From: jalten@cs.vu.nl (Alten JP)
  4. Subject: Re: BC++ 4.5 OWL
  5. Nntp-Posting-Host: kits.cs.vu.nl
  6. References: <310D18B1.40A2@setsk0.rpi.ses.alcatel.es>
  7. Sender: news@cs.vu.nl
  8. Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
  9. Date: Tue, 30 Jan 1996 10:01:58 GMT
  10. X-Newsreader: TIN [version 1.2 PL2]
  11. Message-ID: <DLznvB.Aqy.0.-s@cs.vu.nl>
  12.  
  13. heras (heras@setsk0.rpi.ses.alcatel.es) wrote:
  14. : I'm just starting to work with BC++ 4.5 OWL, and I've found impossible 
  15. : to enable and disable menu options by mean of EnableMenuItem function.
  16. : Instead, it seems to work associating these options to particular 
  17. : functions included in response tables for active or inactive windows.
  18.  
  19. : Is it possible to enable or disable menu options although their handling
  20. : functions will be associated to windows currently active?
  21.  
  22. Have you tried fiddling around with the EV_COMMAND_ENABLE
  23. lines in the response table?
  24. like:
  25.  
  26. ... start of response tabel...
  27.     EV_COMMAND_ENABLE(CM_INFO, CeSomeEnable),
  28.     EV_COMMAND_ENABLE(CM_DELETE, CeSomeEnable),
  29. END_RESPONSE_TABLE;
  30.  
  31.  
  32. TMyWindow::CeSomeEnable(TCommandEnabler& ce)
  33. {
  34.     switch (ce.Id)
  35.     {
  36.         case CM_DELETE : 
  37.             ce.Enable( !restrictions )
  38.             break;
  39.         case CM_INFO : 
  40.             ce.SetCheck(state==info);
  41.             ce.Enable(nrofitems>0)
  42.             break;
  43.     }
  44. }
  45.  
  46. Just a thought, don't hit me if you've already tried this,
  47. just mail me more details....
  48.  
  49. Jelle Paul
  50.  
  51. --
  52. +-------------------------------------------------------+
  53. | Jelle Paul Alten                |   jalten@cs.vu.nl   |
  54. | Vrije Universiteit Amsterdam    |                     |
  55. +-------------------------------------------------------+
  56.